import service from './request'

const cqBaseUrl = import.meta.env.VITE_CQ_SERVER_URL
const headers = {'Content-Type': 'application/json'}

// 精准巡查概览
export const queryPatrolPanelServiceOverview = (params) => {
    return service.post(
        cqBaseUrl + '/kapi/v2/wens/wens_area_digital_space/patrolPanelService/overview',
        {
            ...params
        },
        {
            headers: headers,
        }
    )
}

// 本月告警单、巡查任务统计地图
export const queryPatrolAlarmLocationByOrgId = (params) => {
    return service.post(
        cqBaseUrl + '/kapi/v2/wens/wens_area_digital_space/patrolPanelService/getPatrolAlarmLocationByOrgId',
        {
            ...params
        },
        {
            headers: headers,
        }
    )
}

// 查询生物安全事件列表接口（告警) 
export const queryPatrolAlarmList = (params) => {
    return service.post(
        cqBaseUrl + '/kapi/v2/wens/wens_area_digital_space/patrolPanelService/getPatrolAlarmList',
        {
            ...params
        },
        {
            headers: headers,
        }
    )
}

// 查询生物安全事件列表接口（任务)
export const queryPatrolTaskList = (params) => {
    return service.post(
        cqBaseUrl + '/kapi/v2/wens/wens_area_digital_space/patrolPanelService/getPatrolTaskList',
        {
            ...params
        },
        {
            headers: headers,
        }
    )
}

// 精准巡查任务监控看板（服务部整体）- 环比
export const queryChainRate = (params) => {
    return service.post(
        cqBaseUrl + '/kapi/v2/wens/wens_area_digital_space/patrolPanelService/chainRate',
        {
            ...params
        },
        {
            headers: headers,
        }
    )
}

// 精准巡查任务监控看板（服务部整体）-趋势分析
export const queryTend = (params) => {
    return service.post(
        cqBaseUrl + '/kapi/v2/wens/wens_area_digital_space/patrolPanelService/tend',
        {
            ...params
        },
        {
            headers: headers,
        }
    )
}